/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 3 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.


See LICENSE and AUTHORS for more information.
*/

#include <QApplication>
#include <QMessageBox>
#include <QSslSocket>

#include "clientcontroller.h"


/**
* @mainpage diChat
*
* diChat is a XMPP-Client (aka Jabber-Client) that separates the User-Interface from the Client-Logic.
*
* In Fact, it was designed for having a core running on a remote machine and using the local Client
* to connect to this Core. Thus, having your IM all together at one place, even if you use multiple
* Clients to access the core, like from your Desktop, Notebook or even mobile Phone.
*
* You can access all messages you read with either Client with any of the other, and, if you choose
* to activate always-online-mode, you're core accepts messages for you while your are not connected
* yourself with a Client and displays you as soon as you get back.
*
*
* diChat is licensed under the GPLv3
*
* @author Chris-Werner reimer <betagan@betaworx.de>
*/

/**
* @brief setup QApplication and SslClient
*
*/
int main(int argc, char **argv)
{
    QApplication::setOrganizationName("dichat.betaworx.eu");
    QApplication::setOrganizationDomain("dichat.betaworx.eu");
    QApplication::setApplicationName("dichat-client");

    QApplication app(argc, argv);

    if (!QSslSocket::supportsSsl()) {
        QMessageBox::information(0, "diChat-Client",
                                 "This system does not support OpenSSL which is required to securely connect");
        return -1;
    }

    ClientController *controller = new ClientController();

    return app.exec();
}
